<script data-cfasync="false">
  // detect theme data in localStorage
  var fujiThemeData = localStorage.getItem('fuji_data-theme');
  // if first look, set theme mode to auto
  if (!fujiThemeData) {
    localStorage.setItem('fuji_data-theme', 'auto');
  } else {
    // if not auto mode, change the data-theme attribute of body
    if (fujiThemeData !== 'auto') {
      document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light');
    }
  }
</script>
